class StrategiesController < ApplicationController
  
  def index
    @strategies = Strategy.all(:order => 'name')
  end

  def synchronise
    MiddleMan.worker(:model_synchronizer_worker).enq_synchronise_strategies(:job_key => "#{Time.now.to_s(:short)}_strategies_synchronization")

    flash[:notice] = 'Strategies synchronization has been scheduled successfully.<br>Synchronization will take place in a few seconds.'
    redirect_to strategies_path
  end

end
